home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / ptv1n2.arc / NOXLAT.ASM < prev    next >
Assembly Source File  |  1990-06-14  |  577b  |  17 lines

  1. FILTER:
  2.      SUB  DX,DX     ;zero characters transferred counter
  3.      SUB  AH,AH     ;preconvert AL to a word value
  4. FILTER_LOOP:
  5.      LODSB          ;get next character from source buffer
  6.      PUSH BX
  7.      ADD  BX,AX     ;generate total offset of entry
  8.      MOV  AL,[BX]   ;look it up in filter table
  9.      POP  BX
  10.      AND  AL,AL     ;is it wanted?
  11.      JZ   FILTER_NEXT    ;if not, go to next character
  12.      STOSB          ;it's wanted, store it in output buffer
  13.      INC  DX        ;count this character as usable
  14. FILTER_NEXT:
  15.      LOOP FILTER_LOOP
  16.      RET
  17.